package com.hf.www.base.controller;

import com.hf.www.base.common.BaseController;
import com.hf.www.base.common.Pager;
import com.hf.www.base.model.SysMenusModel;
import com.hf.www.core.plugin.annotation.Control;
import com.jfinal.log.Logger;
import com.jfinal.plugin.activerecord.Page;

@Control(controllerKey="/sys")
public class SysController extends BaseController{
	
	private static final Logger Log = Logger.getLogger(SysController.class);
	
	public void index(){
		render("system/" + getPara(0));
	}
	
	public void getMenus(){
		Pager pager = createPager("type","keyword");
		Page<?> page = SysMenusModel.dao.getAllMenus(pager);
		setAttr("rows", page.getList());
		setAttr("total" , page.getTotalRow());
		renderJson();
	}

}
